#include <QDataStream>
#include "abstract-database-client.h"
#include "model-result.h"
#include "value-result.h"

AbstractDatabaseClient::AbstractDatabaseClient(QObject *parent) :
    QObject(parent)
{
}

ModelResult *AbstractDatabaseClient::selectModel(const QString &queryText, const QVariant &parameter)
{
    QVariantList parameters;
    if (parameter.isValid())
        parameters << parameter;
    return selectModel(queryText, parameters);
}

ValueResult* AbstractDatabaseClient::selectExists (const QString& queryText, const QVariant& parameter)
{
    QVariantList parameters;
    if (parameter.isValid())
        parameters << parameter;
    return selectExists(queryText, parameters);
}

ValueResult *AbstractDatabaseClient::insertData(const QString &queryText, const QVariant &parameter)
{
    QVariantList parameters;
    if (parameter.isValid())
        parameters << parameter;
    return insertData(queryText, parameters);
}
